package com.jlboot.core.exception;

import com.jlboot.core.base.BaseException;
import lombok.Data;

/**
 * 逻辑异常，抛出该异常,应用会拦截，并向前端展示返回该异常信息
 * @author wangsanfei
 */
@Data
public class JlServerException extends BaseException {

    /**
     * 异常信息
     */
    private Throwable throwable;

    public JlServerException(String msg, Throwable throwable){
        this.msg=msg;
        this.throwable=throwable;
    }

    public JlServerException(Integer code, String msg, Throwable throwable){
        this.code=code;
        this.msg=msg;
        this.throwable=throwable;
    }

    public JlServerException(Integer code, String msg, Object data, Throwable throwable){
        this.code=code;
        this.msg=msg;
        this.data=data;
        this.throwable=throwable;
    }

}
